<?php
include('../class/class_address.php');
include('../class/class_workdays.php');
if(!$_GET['number'] || $_GET['number']>100 || $_GET['number']<1)
	exit;
if(!$_GET['workdays'])
{	echo ('
	<div class="anAddressForm" id="anAddress'.$_GET['number'].'">
		<input name="countAddress[]" class="countAddress" type="hidden" value="'.$_GET['number'].'">
	');
	address::showForm($_GET['number']);
	echo ('
		<div class="signature">
			Телефон:
		</div>
		<input name="phone'.$_GET['number'].'" class="phoneInput" id="phoneInput'.$_GET['number'].'" type="text" value="" />
		<div class="checkPhoneRes'.$_GET['number'].'" style="display: inline;">
		</div>
		<div class="signature">
			 Часы работы:
		</div>
		');
		workdays::showForm($_GET['number']);
		echo ('
		<div class="addAddressForm" id="aaf'.$_GET['number'].'">
				Добавить еще адрес
		</div>
		<div class="deleteAddressForm" id="daf'.$_GET['number'].'">
			Отменить
		</div>
	</div>
	');
}
else
{	echo ('
	<div class="anAddress" id="anAddress'.$_GET['number'].'">
		<input name="countAddress[]" class="countAddress" type="hidden" value="'.$_GET['number'].'">
	');   	address::showForm($_GET['number'], $value, true);	echo ('
		<div class="signature">
			Телефон:
		</div>
		<input name="phone'.$_GET['number'].'" class="phoneInput" id="phoneInput'.$_GET['number'].'" type="text" value="'.$_GET['phone'].'" />
		<div class="checkPhoneRes'.$_GET['number'].'" style="display: inline;">
		</div>
		<div class="signature">
			 Часы работы:
		</div>
		');
		workdays::editWorkdays($_GET['workdays'], $_GET['number']);
		echo ('
		<but class="cancelAddressForm" id="caf'.$_GET['number'].'">
			Отменить
		</but>
	</div>
		');}
?>